#include <iostream>
using namespace std;

int main()
{
    int n;
    cin >> n;

    int a = 1, b = 1, c;
    for(int i = 2; i <= n; i++)
    {
        c = a + b;
        a = b;
        b = c;
    }

    if(n == 0 || n == 1) cout << n << endl;
    else cout << c << endl;

    return 0;
}